
<%
if Request("bComm")<>"restart" then
		if Session("Started") ="no" then
			Response.Redirect("..\Error.asp?ErrorCode=1")
		end if
	end if
%>
<%
Session("FormName")="F36"
%>
<!--#include file=..\checkSession.inc-->
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%
On Error Resume next	
	IDFlow = Request("IDFlow")
	bComm = Request("bComm")  
	nodeid = Request("id")
Set Cls=server.CreateObject("Vinalines.ClsFunction")	
Response.Write "<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>"   
    Response.Write "function conf() {"
    Response.Write "if(!confirm('Bạn có muốn xóa không !')){"
    Response.Write "return false;"
    Response.Write "}"
    Response.Write "}"
    If Request("bComm") = "add" Then
		Response.Write "function CmdBack_onclick() {"
        Response.Write "frmnoidung.Target = 'right';"
        Response.Write "frmnoidung.action='frmTvFlowNodecd.asp?IDFlow=" + IDFlow + "';"
        Response.Write "frmnoidung.submit();"
		Response.Write "}"
		Response.Write "function CmdOK_onclick() {"
        Response.Write "frmnoidung.Target = 'right';"            
		Response.Write "if(frmnoidung.Canbo.value==''){"
        Response.Write "alert('Cho biết người xử lý');"
        Response.Write "frmnoidung.Canbo.focus();"
        Response.Write "return false;"
		Response.Write "}"
		Response.Write "else"
		Response.Write "{"
		Response.Write "frmnoidung.action='node/addcd.asp?IDFlow=" + Request("IDFlow") + "';"
		Response.Write "}"
        Response.Write "frmnoidung.submit();"
		Response.Write "}"
    end if
    If bComm = "edit" Then
        Response.Write "function CmdBack_onclick() {"
        Response.Write "frmedit.Target = 'right';"
        Response.Write "frmedit.action='frmTvFlowNodecd.asp?IDFlow=" + IDFlow + "';"
        Response.Write "frmedit.submit();"
		Response.Write "}"
        Response.Write "function CmdOK_onclick() {"
        Response.Write "frmedit.Target = 'right';"
        Response.Write "frmedit.action='node/editcd.asp?IDFlow="+ IDFlow +"&nodeid="+ nodeid +"';"
        Response.Write "frmedit.submit();"
        Response.Write "}"
    end if
    If bComm <> "edit" And bComm <> "add" Then
        Response.Write "function CmdQuaylai_onclick() {"
            Response.Write "frm.target='right';"
            Response.Write "frm.action='frmTvWorkFlow.asp';"
            Response.Write "frm.submit();"
        Response.Write "}"
    End If
Response.Write "</SCRIPT>"
Set Cls=nothing    	
%>
<!--#include file="..\jvfunction.inc"-->
<%
set TvWFlow=server.CreateObject("Vinalines.ClsWorkflow")
	if TvWFlow.OpenConn (Application("StrConn")) then
		call TvWFlow.Tvflowcd
		TvWFlow.CloseConn
	else
		Response.Redirect("..\Error.asp?ErrorCode=2")		
	End if
	if Err.number then
		%><p align=center><font face=Arial color=red size=4>Lỗi ! Không đặc tả 
được lỗi <br><a href=frmTvWorkflow.asp>Quay lại</a></font><%
	End if 
	Err.Clear
%>